<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      margin-top: 1800px;
      width: 200px;
      height: 200px;
      background-color: yellowgreen;
    }
  </style>
</head>

<body>
  <p>你</p>
  <div>我</div>
  <div>我</div>
  <!-- <div>我</div>
  <div>我</div> -->
  <script>
    let dom = document.querySelector('div')
    const Intersection = new IntersectionObserver((entries) => {
      if (entries[0].isIntersecting) {
      }
    })
    Intersection.observe(dom)
  </script>
</body>

</html>